package com.example.employeemanagement.dto;

import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

/**
 * 上传头像DTO
 * 用于处理文件上传请求
 */
@Data
public class UploadAvatarDto {
    private MultipartFile file;
    private Integer employeeId;
    
    public UploadAvatarDto(MultipartFile file, Integer employeeId) {
        if (file == null || file.isEmpty()) {
            throw new IllegalArgumentException("文件不能为空");
        }
        if (employeeId == null || employeeId <= 0) {
            throw new IllegalArgumentException("员工ID无效");
        }
        this.file = file;
        this.employeeId = employeeId;
    }
}